#include <iostream>
#include <string>

using namespace std;

int strLen(char* chars){
	if(chars == 0)
		return 0;
	if(chars == NULL)
		return 0;
	const char *ptr = chars;
	int count = 0;
	while(*chars++){ // while(chars[count++] != '\0');
		*chars = *chars + 3; // Unhandled exception at 0x00b6155a in Chapter3-DataTypes.exe: 0xC0000005: Access violation writing location 0x00b67831.
	}
	return count - 1;
}

void CharsStringTest(){
	char* chars = "123456";
	// chars = "";

	cout << "characters count of string \"" << chars << "\" is: " << strLen(chars) << endl;
}


